From: Richard M. Stallman Date: Tue, 1 Feb 1994 23:10:41 +0000 (+0000) Subject: (font-lock-set-defaults): Handle shell mode. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~93334 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=03244f89b5515e8794a732fcd37131db19da2caf;p=emacs.git (font-lock-set-defaults): Handle shell mode. (shell-font-lock-keywords): New variable. --- diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d0c042d39d3..27538a8f532 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -437,6 +437,7 @@ This can take a while for large buffers." ((eq major-mode 'perl-mode) perl-font-lock-keywords) ((eq major-mode 'tex-mode) tex-font-lock-keywords) ((eq major-mode 'texinfo-mode) texi-font-lock-keywords) + ((eq major-mode 'shell-mode) shell-font-lock-keywords) (t nil))))) (defconst lisp-font-lock-keywords-1 @@ -635,6 +636,15 @@ This does a lot more highlighting.") ) "Additional expressions to highlight in TeXinfo mode.") +(defvar shell-font-lock-keywords + (list (cons shell-prompt-pattern 'font-lock-keyword-face) + (list (concat shell-prompt-pattern "\\([^ \t]+\\)") + 1 'font-lock-function-name-face) + '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face) + '("^[^ \t]+:.*$" . font-lock-string-face) + '("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) + "Additional expressions to highlight in TeXinfo mode.") + (provide 'font-lock) ;;; font-lock.el ends here